<template>
  <!-- 商品列表 -->
  <div class="item-block order-goods">
    <ul>
      <li class="goods-li" 
          v-for="(goods,index) in buyLists"
          :key="index"
          @click="JumpName('exchangeDetail',{id:goods.point_exchange_id})">
        <section class="order-goods-img"> 
          <img :src="goods.pic_url+'180x180'"  v-if="goods.is_compress">
          <img :src="goods.pic_url"  v-else> 
        </section>
        <section class="order-goods-infor g-flex">
          <div class="goods-title">
            <span class="fontZiy" v-if="goods.is_self_support == 1">自营</span>{{goods.title}}
          </div>
          <p class="goods-props" v-if="goods.props">{{goods.props}}</p>
          <!-- 商品价格 -->
          <p class="price_num">
            <span class="price_box">
              <span class="price">兑换{{point_name}}:{{goods.points}}</span>
            </span>    
            <span class="num">&times;<i class="J-num">{{goods.num}}</i></span>
          </p> 
        </section>
        <!-- 
          <input type="hidden" name="item_id[]" value="{$buy_vo.item_id}">
          <input type="hidden" name="point_exchange_id[]" value="{$buy_vo.point_exchange_id}">
          <input type="hidden" name="num[]" value="{$buy_vo.num}">
          <input type="hidden" name="sku_id[]" value="{$buy_vo.sku_id}">
         -->
      </li>
    </ul>
  </div>
</template>

<script>
import Vue from 'vue'
import { scaleGoodsPrice } from '@/utils/index.js'
export default Vue.extend({
  props: {
    point_name: {
      type: String,
      default: ''
    },
    buyLists: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      consumPoints: 0,
      consumPrices: 0,
      subArr: []
    }
  },
  methods: {
    scaleGoodsPriceFn(price) {
      return scaleGoodsPrice(price)
    },
    JumpName(url, data) {
      this.$JumpName(this, url, data)
    }
  }
})
</script>

<style lang="scss">
.price_box{
  font-size: 28px;
  font-family: Gilroy-Regular;
  color: #F30C23;
}
</style>